<?php

class Default_Model_Table_News extends Zend_Db_Table_Abstract
{
    protected $_name = 'news';
    
    public function getNewsMainPage()
    {
        $select = $this->select();
        $select->order('id DESC')
               ->where('main=1')
               ->limit('4');
        $UserMenuData = $this->_db->query($select)->fetchAll();
        return $UserMenuData;
    }

        public function getNews()
    {
        $select = $this->select();
        $select->order('id ASC')
               ->limit('25');
        $UserMenuData = $this->_db->query($select)->fetchAll();
        return $UserMenuData;
    }

        public function getAllNews()
    {
        $select = $this->select();
        $select->order('id ASC');
        $UserMenuData = $this->_db->query($select)->fetchAll();
        return $UserMenuData;
    }
}

